<%@ page import="org.apache.ibatis.session.SqlSession" %>
<%@ page import="mybatis.util.MybatisUtil" %>
<%@ page import="mybatis.dao.StudentDao" %>
<%@ page import="mybatis.pojo.Student" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: Dell
  Date: 2022/6/30
  Time: 13:38
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>分页显示学生的信息，显示第一页（mybatis或者jdbc)</title>
</head>
<body>
<%
    SqlSession s = MybatisUtil.get();
    StudentDao mapper = s.getMapper(StudentDao.class);
    List<Student> list = mapper.findALL();
    //list.forEach(out::print);
    for(Student st:list)
        out.print(st);
    MybatisUtil.close(s);
%>

</body>
</html>
